PUT Order
When an order is created in the LetsGetChecked system, it is immediately set for dispatch by our team. In most cases, an order is dispatched within one business day of order creation.
Order operations are created to manage the client/customer purchases with LetsGetChecked. The operation is idempotent. If the response of the operation is not obtained, for example if the connection breaks, the client application can retry. If the previous invocation never arrived it runs for the first time, and if it runs, the previous result is returned.
Request
Endpoint
PUT {clientId}/api/v2/orders/{clientOrderId}
Create a unique order for a specific client.
Headers
The PUT Order API requires the following information in the headers of an HTTP request:
HTTP Header | Description |
---|---|
Authorization | The HTTP Authorization request header contains the credentials to authenticate a user agent with a server. |
Accept | The HTTP Accept request header contains information about the content types, expressed as MIME types, that the client can understand. The MIME type for the PUT Order API request is application/json. |
Content-Type | The Content-Type request header defines the type of data that the client sends to the server. For the PUT Order API request, the type of data is application/json. |
Path parameters
Parameter | Description | Type | Required/Optional |
---|---|---|---|
clientId | The clientId is a unique code that LetsGetChecked provides. The clientId is used to identify a client, when a client calls the Orders and Results APIs. The code is formed by 1 to 4 alphanumeric characters. The clientId displays in the HL7 results as PV1.3.1. | string | Required |
clientOrderId | The clientOrderId is a unique ID, per order, in the client's system. The maximum length is 100 characters. When a client application uses the Order API, a clientOrderId value is generated by the client that is the reference for the order in the LetsGetChecked system. The Client Order ID displays in the HL7 results as an AOE OBX segment. | string | Required |
Sample request
{
"address":{
"addressLine1":"Line1",
"addressLine2":"Line2",
"city":"Boston",
"countryIsoAlpha2":"US",
"postalCode":"55555",
"state":"MA"
},
"patientInfo": {
"participantId":"11111",
"firstName":"fName",
"middleName":"mName",
"lastName":"lName",
"email":"test@email.com",
"phoneNumber":{
"phoneCountryCode":"+1",
"phoneNumber":"555588888"
},
"gender": "Male",
"dob": "1901-12-06",
"ethnicity": "Hispanic",
"race": "AfricanAmerican",
"participantLanguage": "SPANISH",
"healthPlanName": "PayerPlanName"
},
"programCode": "Health4All",
"orderItems": [
{
"code":"GLCS",
"quantity":1
},
{
"code":"FCIT",
"quantity":1
}
],
"physicianInfo":{
"firstName":"PhysicianFirstName",
"middleName":"MiddleName",
"lastName":"PhysicianLastName",
"npi":1000000001
},
"primaryCareProvider":{
"id":"PCP1234567",
"firstName":"test",
"middleName":"middle",
"lastName":"last",
"address":{
"addressLine1":"330 W 38th Street",
"addressLine2":"405",
"city":"New York",
"countryIsoAlpha2":"US",
"postalCode":"10018"
},
"phone":"965878945",
"phone2":"123456789",
"fax":"8181818181",
"vendorName":"vendorName"
},
"insurance": {
"insurancePlan": {
"policyNumber":"12345",
"planName":"InsurancePlanName",
"hierarchy":"Primary",
"groupName":"InsuranceGroupName",
"groupNumber": "GH123"
}
},
"note":"Order Note",
"diagnosisCodes":[
"D01",
"D02"
],
"customData":[
{
"key":"SubscriberID",
"value":"12345678"
},
{
"key":"key2",
"value":"value2"
},
{
"key":"key3",
"value":"value3"
}
]
}
Request definitions
The following table describes each item in the body of the request:
Element | Description | Type | Required/Optional |
---|---|---|---|
patientInfo | Information about the patient. | object(PatientModel) | Required |
patientInfo /participantId | The Participant ID must be unique and associated with a person in your system of record. It can be an employee ID or Customer ID. Do not reuse or recycle Participant IDs. | string | Required |
patientInfo /firstName | The patient’s first name. | string | Required |
patientInfo /middleName | The patient’s middle name. | string | Optional |
patientInfo /lastName | The patient’s last name. | string | Required |
patientInfo /email | The patient’s email address. | string | Optional |
patientInfo /phoneNumber | The patient’s phone number. | object(PhoneNumberModel) | Required |
patientInfo /phoneNumber /phoneCountryCode | The country code of the user’s phone number. Format: The value should start with a "+" followed by one to four numeric digits. | string | Required |
patientInfo /phoneNumber /phoneNumber | The remaining digits of the user’s phone number, after the country code. | string | Required |
patientInfo /gender | The patient’s gender. The following case agnostic values are allowed:
| string | Required |
patientInfo /dob | The patient’s date of birth. The format is YYYY-MM-DD. | string | Required |
patientInfo /ethnicity | The patient’s ethnicity. The following values are allowed:
| string | Required |
patientInfo /race | The patient’s race. The following values are allowed: UnknownRace, AmericanIndian, NativeAlaskan, Asian, AfricanAmerican, African, Hispanic, Latino, PacificIslander, NativeHawaiian, Caucasian, AshkenaziOrSephardiJewish, OtherRace | string | Required |
patientInfo /participantLanguage | The patient’s language. The following case agnostic values are allowed:
| string | Optional |
patientInfo /healthPlanName | The sub-plan name for the current payer. | string | Optional |
address | The user’s address based on the address in the request. | object(AddressModel) | Required |
address /addressLine1 | The first line of the user’s address. This can have a maximum length of 35 characters. | string | Required |
address /addressLine2 | The second line of the user’s address. This can have a maximum length of 35 characters. | string | Optional |
address /city | The user’s city. | string | Required |
address /countryIsoAlpha2 | The user’s country. Must be the ISO-3166 standard compliant. Allowed value: US | string | Optional |
address /postalCode | The user’s postal code or zip code. | string | Required |
address /state | The user’s state. Allowed values: AK, AL, AZ, AR, CA, CO, CT, DE, DC, FL, GA, HI, ID, IL, IN, IA, KS, KY, LA, ME, MD, MA, MI, MN, MS, MO, MT, NE, NV, NH, NJ, NM, NY, NC, ND, OH, OK, OR, PA, PR, RI, SC, SD, TN, TX, UT, VT, VA, WA, WV, WI, WY | string | Optional |
diagnosisCodes | The diagnosis code. It displays in the HL7 results as one DG1 segment per code. | Array of string | Optional |
programCode | The code associated with the program, that is provided by LetsGetChecked. | string | Required |
orderItems | Order Items associated with an order. | object(CreateOrderItemModel) | Required |
orderItems /code | The test kit code for Order Items, provided by LetsGetChecked. | string | Required |
orderItems /quantity | The quantity of Order Items. | integer | Required |
physicianInfo | The physician information. You can use this object to submit physician information for a physician that does not order from LetsGetChecked. Note: The physicianInfo information is mandatory when the physician is not a LetsGetChecked physician. | object(PhysicianInfo) | Optional |
physicianInfo /firstName | The first name of the physician. | string | Required |
physicianInfo /middleName | The middle name of the physician. | string | Optional |
physicianInfo /lastName | The last name of the physician. | string | Required |
physicianInfo /npi | The National Provider Identifier (NPI) for the physician (USA). | integer | Required |
primaryCareProvider | The patient Primary Care Provider (PCP) information. | object(PrimaryCareProviderModel) | Optional |
primaryCareProvider /id | The PCP unique identicator
| string | Required |
primaryCareProvider /firstName | The PCP's first name. Tip: Together, the first, middle, and last names combined should have less than 100 characters. | string | Required |
primaryCareProvider /middleName | The PCP's middle name. Tip: Together, the first, middle, and last names combined should have less than 100 characters. | string | Optional |
primaryCareProvider /lastName | The PCP's last name. Tip: Together, the first, middle, and last names combined should have less than 100 characters. | string | Required |
primaryCareProvider /phone | The PCP's phone number. | string | Optional |
primaryCareProvider /phone2 | The PCP's secondary phone number. | string | Optional |
primaryCareProvider /fax | The PCP's fax number. | string | Optional |
primaryCareProvider /vendorName | The PCP vendor provider name. | string | Optional |
primaryCareProvider /address | The PCP's address. | object(AddressModel) | Required |
insurance | A patient’s Insurance information. | object(InsuranceModel) | Optional |
insurance /insurancePlan | Information associated with a patient’s Insurance Plan. | object(InsurancePlanModel) | Optional |
insurance /insurancePlan /policyNumber | This is required to be a Policy Number associated with a patient’s Insurance Plan. Accepts up to 30 characters. | string | Required |
insurance /insurancePlan /planName | A patient’s Insurance Plan Name. | string | Required |
insurance /insurancePlan /hierarchy | The hierarchy of a Plan Type associated with a patient’s Insurance Plan. Possible values: Unknown, Primary, Secondary, Tertiary. | string | Optional |
insurance /insurancePlan /groupName | The Group Name associated with a Patient’s Insurance Plan. | string | Optional |
insurance /insurancePlan /groupNumber | The group name associated with the patient insurance. | string | Optional |
customData | Contains any additional custom data that is associated with an order and it is available for reporting purposes.
customData
| List of key-value pairs | Optional |
note | Contains any additional notes or information. | string | Optional |
Response
The sample response is a single JSON object that contains the following fields:
Property | Description | Type |
---|---|---|
clientOrderId | The clientOrderId is a unique ID, per order, in the client's system. The maximum length is 100 characters. When a client application uses the Order API, a clientOrderId value is generated by the client that is the reference for the order in the LetsGetChecked system. | string |
participantId | The participantId must be unique and associated with someone in your system of record. It can be an employee ID or Customer ID. Do not reuse or recycle participant IDs. | string |
orderItems | Order Items associated with an order. | object(CreateOrderItemModel) |
orderItems /code | This is a unique identifier for each type of test kit provided by LetsGetChecked. | string |
orderItems /id | The unique order item identifier in the LetsGetChecked system. | string |
Status Codes
Status Code | Description |
---|---|
202 | Accepted. New Order placed for Creation |
400 | Bad Request |
401 | Unauthorized |
404 | NotFound |
409 | Conflict. Order cannot be modified after successful submission |
415 | Unsupported media type. Payload in a unsupported format |
500 | Server Error |
503 | Server Error |
Sample Responses
200
{
"clientOrderId":"1234567",
"participantId":"11111",
"orderItems": [
{
"code": "Code1",
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
}
]
}